import { connect } from 'react-redux';
import { goBack } from 'react-router-redux';
import reportColorectalcancer from '../components/report-colorectalcancer'
import { calcRiskOfColorectalCancer } from '../actions/CalcRiskAction';

const mapStateToProps = (state, ownProps) => ({
  inputData: state.report.colorectalCancer.inputData,
  risk: state.report.colorectalCancer.risk,
  initialRisk: state.report.colorectalCancer.initialRisk,
  advice: state.report.colorectalCancer.initialAdvice,
  healthy: state.report.colorectalCancer.initialHealthy,
});

const mapDispatchToProps = (dispatch) => ({
  onCalcRisk: (data) => dispatch(calcRiskOfColorectalCancer(data)),
  onCancel: ()=>dispatch(goBack()),
});
export default connect(mapStateToProps, mapDispatchToProps)(reportColorectalcancer)
